package com.cloud.domian;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 订单表
 * @Author: jeecg-boot
 * @Date:   2022-05-13
 * @Version: V1.0
 */
@Data
@TableName("`order`")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="order对象", description="订单表")
public class Order implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.AUTO)
	@NotBlank(message = "主键不能为空!", groups = {Update.class})
    @ApiModelProperty(value = "主键")
    private String id;


    @ApiModelProperty(value = "订单编号")
    private String orderNumber;


    @ApiModelProperty(value = "用户id")
    private String userId;



    @ApiModelProperty(value = "支付方式 1 微信 2 支付宝 3 现金")
    @NotBlank(message = "支付方式 不能为空!",groups = Add.class)
    private String paymentWay;


    @ApiModelProperty(value = "支付状1 待支付 2 已支付 3 已退费")
    private String paymentState;


    @ApiModelProperty(value = "支付来源 (01-小程序 02-公众号)")
    @NotBlank(message = "支付来源 不能为空!",groups = Add.class)
    private String paySource;

    @ApiModelProperty(value = "应付金额")
    private BigDecimal payableAmount;


    @ApiModelProperty(value = "实际支付")
    private BigDecimal  paymentPrice;

    @ApiModelProperty(value = "折扣金额")
	private BigDecimal discountMoney;



    @ApiModelProperty(value = "提货类型 1自提 2配送")
    private String pickupType;


	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "支付时间")
    private Date paymentTime;


    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "支付失效时间")
    private Date payExpireTime;



    @ApiModelProperty(value = "支付备注")
    private String payRemark;

    @ApiModelProperty(value = "删除标志")
	private String delFlag;

	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;

	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;

	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;

	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;

	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;




    @ApiModelProperty(value = "商品id")
    private String productId;

    @ApiModelProperty(value = "商品属性id")
    private String productSpecsId;


    @ApiModelProperty(value = "数量")
    private Integer productNum;

    @ApiModelProperty(value = "didi手机号")
    private String didiPhone;

    @ApiModelProperty(value = "邮寄地址")
    private String addressId;


    @ApiModelProperty(value = "发货状态")
    private String goodsState;

	 public interface Add {

        }

     public interface Update {

        }
}
